import request from '@/utils/request'

// 查询VIP兑换码表列表
export function listFhVipExchangeCode(query, pageReq) {
  return request({
    url: '/act/fhVipExchangeCode/list',
    method: 'post',
    data: query,
    params: pageReq
  })
}

// 查询VIP兑换码表详细
export function getFhVipExchangeCode(id) {
  return request({
    url: '/act/fhVipExchangeCode/' + id,
    method: 'get'
  })
}

// 新增VIP兑换码表
export function addFhVipExchangeCode(data) {
  return request({
    url: '/act/fhVipExchangeCode',
    method: 'post',
    data: data
  })
}

// 修改VIP兑换码表
export function updateFhVipExchangeCode(data) {
  return request({
    url: '/act/fhVipExchangeCode',
    method: 'put',
    data: data
  })
}

// 删除VIP兑换码表
export function delFhVipExchangeCode(id) {
  return request({
    url: '/act/fhVipExchangeCode/' + id,
    method: 'delete'
  })
}

// 导出VIP兑换码表
export function exportFhVipExchangeCode(query) {
  return request({
    url: '/act/fhVipExchangeCode/export',
    method: 'get',
    params: query
  })
}

// 批量生成VIP兑换码
export function batchGenerateVipExchangeCode(data) {
  return request({
    url: '/act/fhVipExchangeCode/batchGenerate',
    method: 'post',
    data: data
  })
}
